
* Load data for all experiments


* ------------------------------ TABLE: SUMMARY STATISTICS FOR EACH WAVE ------------------------------

	eststo clear 

	* 
	local controls male age employed college

	use "${pathdata_summary}/BaselineSummary.dta", clear
	eststo study1:  estpost sum 
	
	use "${pathdata_summary}/AssociationSummary.dta", clear
	eststo study2:  estpost sum 
	
	use "${pathdata_summary}/ProductSummary.dta", clear
	eststo study4:  estpost sum 
	
	use "${pathdata_summary}/DecoySummary.dta", clear
	eststo study5:  estpost sum 
	
	use "${pathdata_summary}/FormatSummary.dta", clear
	eststo study7:  estpost sum 
	
	use "${pathdata_summary}/UninformativeSummary.dta", clear
	eststo Rev1:  estpost sum 
	
	use "${pathdata_summary}/CuetargetsimSummary.dta", clear
	eststo Rev2:  estpost sum 
	
	use "${pathdata_summary}/ContextSummary.dta", clear
	eststo Rev3:  estpost sum 
	
	use "${pathdata_summary}/CuenontargetSummary.dta", clear
	eststo Rev4:  estpost sum 




***************************************************
**** Step 3: Write out to table *******************
***************************************************

/* SOME COMMENTS ON THE ESTTAB CODE

The table didn't format nicely. This might be due to some bug or maybe my old STATA version.
I had to manually implement \end{tabular} and a '}' so that the Latex code actually compiles.
If my code does not work for you: maybe you can check whether it automatically writes \end{tabular} and '}' into the Latex file.
Then, the postfoot is redundant and you can delete it :)

*/



	esttab study1 Rev3 Rev2 Rev4 Rev1 study5 study4 study7 study2 using "${pathout_summary}/tables/tableA11.tex", ///
	replace booktabs collabels(none) nomtitles b(2) f cells(mean(fmt(3 3 3 3))) ///
	keep(male age college employed) order(male age college employed) coeflabels(male "Male" age "Age (years)" college "College" employed "Employed") stat(N, labels("Observations") fmt(%9.0gc)) ///
			prehead("{\begin{tabular}{l*{9}{c}}\toprule\toprule&\multicolumn{2}{c}{Baseline Experiments} &  \multicolumn{2}{c}{Mechanisms} &  \multicolumn{5}{c}{Robustness} \\\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-10} \textit{Experiment:} &\multicolumn{1}{c}{New Baseline} &\multicolumn{1}{c}{Context} &\multicolumn{1}{c}{Cue-Target Sim} &\multicolumn{1}{c}{Cue-Non-Target Sim} &\multicolumn{1}{c}{Uninformative} &\multicolumn{1}{c}{Decoy} &\multicolumn{1}{c}{Product} &\multicolumn{1}{c}{Format} &\multicolumn{1}{c}{Association}\\") ///
			postfoot("\bottomrule \end{tabular} }")






